.home-page {
  width: 100vw;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  background-color: #f1f1f1;
  z-index: 10;
  &-header {
    background-color: #001529;
    height: 48px;
    line-height: 48px;
    padding: 0 24px;
    color: #fff;
    font-size: 18px;
    display: flex;
    justify-content: space-between;
    a {
      user-select: none;
    }
    &-theme {
      font-size: 14px;
      > img {
        margin-right: 8px;
      }
      > span {
        vertical-align: middle;
      }
    }
  }
  &-content {
    height: calc(100% - 48px);
    width: 100%;
    box-sizing: border-box;
    padding: 8px;
    display: flex;
    flex-flow: row nowrap;
    &-sider {
      height: 100%;
      width: 220px;
      flex: 0 0 220px;
      background-color: #fff;
      padding: 8px;
      &-top {
        height: 60px;
      }
      &-content {
        height: calc(100% - 60px);
        margin-top: 16px;
        overflow-y: auto;
        ul {
          margin: 0;
          padding: 0;
          display: flex;
          flex-flow: row wrap;
          li {
            margin-bottom: 8px;
            margin-right: 6px;
            list-style: none;
            border: 1px solid #1890ff;
            border-radius: 11px;
            height: 22px;
            line-height: 20px;
            padding: 0 10px;
            cursor: pointer;
            transition: all 0.3s;
            user-select: none;
            &.label-selected {
              background: #1890ff;
              color: #fff;
            }
          }
        }
      }
    }
    &-content {
      flex: 1;
      height: 100%;
      background: #fff;
      margin-left: 8px;
      padding: 8px;
      overflow-y: hidden;
      display: flex;
      flex-direction: column;
      &-header {
        line-height: 36px;
        border-bottom: 1px solid #efefef;
        margin-bottom: 4px;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        .ant-form-item {
          margin-bottom: 0;
          margin-right: 24px;
        }
      }
      ul.home-page-content-content-list {
        margin: 0;
        padding: 0;
        display: flex;
        flex-flow: row wrap;
        overflow-y: auto;
        li {
          flex: 0 0 140px;
          height: 180px;
          margin: 8px;
          list-style: none;
          // cursor: pointer;
          & > p {
            font-size: 12px;
            color: #333;
            text-align: center;
          }
          .list-item-img-wrapper {
            width: 100%;
            padding-top: 100%;
            position: relative;
            box-shadow: 1px 1px 5px 0 #ccc;
            overflow: hidden;
            transition: all 0.3s;
            &:hover {
              // transform: translateY(-12px);
              .list-item-preview-mask {
                transform: translateY(0);
              }
            }
            img {
              position: absolute;
              top: 50%;
              left: 0;
              transform: translateY(-50%);
              width: 100%;
              height: auto;
            }
            .list-item-preview-mask {
              display: flex;
              flex-direction: column;
              justify-content: center;
              align-items: center;
              position: absolute;
              top: 0;
              left: 0;
              bottom: 0;
              right: 0;
              transform: translateY(-100%);
              background: rgba(0, 0, 0, 0.35);
              transition: all .3s;
              span {
                padding: 4px 8px;
                border-radius: 4px;
                color: #fff;
                transition: all .3s;
                font-size: 12px;
                cursor: pointer;
                &:hover {
                  color: #1890ff;
                  background: rgba(0, 0, 0, 0.25);
                }
              }
            }
          }
        }
      }
    }
  }
  &-preview {
    position: fixed;
    top: 0;
    width: 0;
    height: 0;
    left: 0;
    z-index: 10;
    &-show &-mask, &-show &-content {
      display: block;
    }
    &-show &-mask {
      animation: preview-fade-in ease 0.3s;
    }
    &-show &-content {
      animation: preview-content-in ease 0.3s;
    }
    &-closing &-mask {
      animation: preview-fade-out ease 0.3s;
    }
    &-closing &-content {
      animation: preview-content-out ease 0.3s;
    }
    &-mask {
      display: none;
      position: absolute;
      left: 0;
      right: 0;
      width: 100vw;
      height: 100vh;
      background-color: rgba(0, 0, 0, 0.35);
    }
    &-content {
      display: none;
      position: absolute;
      left: 50vw;
      top: 50vh;
      width: 80vw;
      min-width: 800px;
      height: auto;
      min-height: 400px;
      transform: translate(-50%, -50%);
      padding: 8px;
      background-color: #f1f1f1;
      .page-head {
        margin-bottom: 8px;
      }
      &-actions {
        position: absolute;
        right: 0;
        top: 0;
        width: 0;
        height: 0;
        &-close {
          display: block;
          width: 42px;
          height: 42px;
          position: absolute;
          left: -21px;
          top: -21px;
          border-radius: 50%;
          background-color: #1890ff;
          line-height: 42px;
          font-size: 12px;
          text-align: center;
          color: #fff;
          cursor: pointer;
          user-select: none;
          &:before, &:after {
            display: block;
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 16px;
            height: 2px;
            background: #fff;
            transform: translate(-50%, -50%);
          }
          &:before {
            transform: translate(-50%, -50%) rotateZ(45deg);
          }
          &:after {
            transform: translate(-50%, -50%) rotateZ(-45deg);
          }
        }
      }
      &-wrapper {
        height: 80vh;
        overflow: auto;
        display: flex;
        flex-direction: column;
        .page-content {
          height: 100%;
          overflow-y: auto;
        }
        &.preview-type-block {
          padding: 32px;
          width: 100%;
          height: 100%;
          // display: flex;
          // justify-content: center;
          // align-items: center;
          box-sizing: border-box;
        }
      }
    }
  }
}


@keyframes preview-fade-in {
  0% {opacity: 0;}
  100% {opacity: 1;}
}

@keyframes preview-fade-out {
  0% {opacity: 1;}
  100% {opacity: 0;}
}

@keyframes preview-content-in {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes preview-content-out {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2);
  }
}